package day18_PokerGame;

import java.util.Map;
import java.util.TreeMap;

//TreeMap修改排序规则

public class TreeMap01 {
    public static void main(String[] args) {
        Map<Student,String> map = new TreeMap<>();
        Student s1= new Student ("xiaoming", 18);
        Student s2= new Student ("xiaogang", 19);
        Student s3= new Student ("xiaoli", 18);
        map.put(s1,"beijing");
        map.put(s2,"shanghai");
        map.put(s3,"shenzhen");
        System.out.println(map);
    }
}
